3.1.15 \(\int \frac {\sin (x)}{(a+a \sin (x))^2} \, dx\) [15]

Optimal. Leaf size=33 \[ \frac {\cos (x)}{3 (a+a \sin (x))^2}-\frac {2 \cos (x)}{3 \left (a^2+a^2 \sin (x)\right )} \]

[Out]

1/3*cos(x)/(a+a*sin(x))^2-2/3*cos(x)/(a^2+a^2*sin(x))

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2829, 2727} \begin {gather*} \frac {\cos (x)}{3 (a \sin (x)+a)^2}-\frac {2 \cos (x)}{3 \left (a^2 \sin (x)+a^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sin[x]/(a + a*Sin[x])^2,x]

[Out]

Cos[x]/(3*(a + a*Sin[x])^2) - (2*Cos[x])/(3*(a^2 + a^2*Sin[x]))

Rule 2727

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[-Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 2829

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*
c - a*d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/(a*f*(2*m + 1))), x] + Dist[(a*d*m + b*c*(m + 1))/(a*b*(2*m + 1)
), Int[(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 -
b^2, 0] && LtQ[m, -2^(-1)]

Rubi steps

\begin {align*} \int \frac {\sin (x)}{(a+a \sin (x))^2} \, dx &=\frac {\cos (x)}{3 (a+a \sin (x))^2}+\frac {2 \int \frac {1}{a+a \sin (x)} \, dx}{3 a}\\ &=\frac {\cos (x)}{3 (a+a \sin (x))^2}-\frac {2 \cos (x)}{3 \left (a^2+a^2 \sin (x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 29, normalized size = 0.88 \begin {gather*} -\frac {-3+\cos (x)+\cos (2 x)-4 \sin (x)+\sin (2 x)}{3 a^2 (1+\sin (x))^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]/(a + a*Sin[x])^2,x]

[Out]

-1/3*(-3 + Cos[x] + Cos[2*x] - 4*Sin[x] + Sin[2*x])/(a^2*(1 + Sin[x])^2)

________________________________________________________________________________________

Maple [A]
time = 0.11, size = 27, normalized size = 0.82

method result size
default \(\frac {\frac {4}{3 \left (\tan \left (\frac {x}{2}\right )+1\right )^{3}}-\frac {2}{\left (\tan \left (\frac {x}{2}\right )+1\right )^{2}}}{a^{2}}\) \(27\)
risch \(-\frac {2 \left (3 i {\mathrm e}^{i x}+3 \,{\mathrm e}^{2 i x}-2\right )}{3 \left ({\mathrm e}^{i x}+i\right )^{3} a^{2}}\) \(33\)
norman \(\frac {-\frac {2 \tan \left (\frac {x}{2}\right )}{a}-\frac {2}{3 a}-\frac {2 \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{a}-\frac {2 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{3 a}}{a \left (\tan ^{2}\left (\frac {x}{2}\right )+1\right ) \left (\tan \left (\frac {x}{2}\right )+1\right )^{3}}\) \(60\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)/(a+a*sin(x))^2,x,method=_RETURNVERBOSE)

[Out]

4/a^2*(1/3/(tan(1/2*x)+1)^3-1/2/(tan(1/2*x)+1)^2)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 62 vs. \(2 (29) = 58\).
time = 0.40, size = 62, normalized size = 1.88 \begin {gather*} -\frac {2 \, {\left (\frac {3 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + 1\right )}}{3 \, {\left (a^{2} + \frac {3 \, a^{2} \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {3 \, a^{2} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {a^{2} \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+a*sin(x))^2,x, algorithm="maxima")

[Out]

-2/3*(3*sin(x)/(cos(x) + 1) + 1)/(a^2 + 3*a^2*sin(x)/(cos(x) + 1) + 3*a^2*sin(x)^2/(cos(x) + 1)^2 + a^2*sin(x)
^3/(cos(x) + 1)^3)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (29) = 58\).
time = 0.35, size = 60, normalized size = 1.82 \begin {gather*} \frac {2 \, \cos \left (x\right )^{2} + {\left (2 \, \cos \left (x\right ) + 1\right )} \sin \left (x\right ) + \cos \left (x\right ) - 1}{3 \, {\left (a^{2} \cos \left (x\right )^{2} - a^{2} \cos \left (x\right ) - 2 \, a^{2} - {\left (a^{2} \cos \left (x\right ) + 2 \, a^{2}\right )} \sin \left (x\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+a*sin(x))^2,x, algorithm="fricas")

[Out]

1/3*(2*cos(x)^2 + (2*cos(x) + 1)*sin(x) + cos(x) - 1)/(a^2*cos(x)^2 - a^2*cos(x) - 2*a^2 - (a^2*cos(x) + 2*a^2
)*sin(x))

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 87 vs. \(2 (31) = 62\).
time = 0.77, size = 87, normalized size = 2.64 \begin {gather*} - \frac {6 \tan {\left (\frac {x}{2} \right )}}{3 a^{2} \tan ^{3}{\left (\frac {x}{2} \right )} + 9 a^{2} \tan ^{2}{\left (\frac {x}{2} \right )} + 9 a^{2} \tan {\left (\frac {x}{2} \right )} + 3 a^{2}} - \frac {2}{3 a^{2} \tan ^{3}{\left (\frac {x}{2} \right )} + 9 a^{2} \tan ^{2}{\left (\frac {x}{2} \right )} + 9 a^{2} \tan {\left (\frac {x}{2} \right )} + 3 a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+a*sin(x))**2,x)

[Out]

-6*tan(x/2)/(3*a**2*tan(x/2)**3 + 9*a**2*tan(x/2)**2 + 9*a**2*tan(x/2) + 3*a**2) - 2/(3*a**2*tan(x/2)**3 + 9*a
**2*tan(x/2)**2 + 9*a**2*tan(x/2) + 3*a**2)

________________________________________________________________________________________

Giac [A]
time = 0.48, size = 21, normalized size = 0.64 \begin {gather*} -\frac {2 \, {\left (3 \, \tan \left (\frac {1}{2} \, x\right ) + 1\right )}}{3 \, a^{2} {\left (\tan \left (\frac {1}{2} \, x\right ) + 1\right )}^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+a*sin(x))^2,x, algorithm="giac")

[Out]

-2/3*(3*tan(1/2*x) + 1)/(a^2*(tan(1/2*x) + 1)^3)

________________________________________________________________________________________

Mupad [B]
time = 6.30, size = 21, normalized size = 0.64 \begin {gather*} -\frac {2\,\left (3\,\mathrm {tan}\left (\frac {x}{2}\right )+1\right )}{3\,a^2\,{\left (\mathrm {tan}\left (\frac {x}{2}\right )+1\right )}^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)/(a + a*sin(x))^2,x)

[Out]

-(2*(3*tan(x/2) + 1))/(3*a^2*(tan(x/2) + 1)^3)

________________________________________________________________________________________